css_pm_scmi: optimise cpu suspend to remove redundant scmi call
authorDeepak Pandey <[email protected]>
Tue, 10 Oct 2017 16:04:32 +0000 (21:34 +0530)
committerNariman Poushin <[email protected]>
Fri, 3 Aug 2018 16:42:54 +0000 (17:42 +0100)
In css platforms where the cpu/cluster management is done by the hardware,
software does need to issue certain scmi requests.

This patch wraps those scmi calls around the HW_ASSISTED_COHERENCY
build option to remove them on platforms that have this hardware support.

Change-Id: Ie818e234484ef18549aa7f977aef5c3f0fc26c27
Signed-off-by: Deepak Pandey <[email protected]>
Signed-off-by: Amit Daniel Kachhap <[email protected]>
Signed-off-by: Nariman Poushin <[email protected]>
plat/arm/css/drivers/scp/css_pm_scmi.c

index 7032267715cb53457fc435282ff5f14d818275ce..cb39da27e659e1b3beaceeeab9a09e2830491c7d 100644 (file)
@@ -79,8 +79,7 @@ ARM_INSTANTIATE_LOCK;
  */
 void css_scp_suspend(const struct psci_power_state *target_state)
 {
-       int lvl, ret;
-       uint32_t scmi_pwr_state = 0;
+       int ret;
 
        /* At least power domain level 0 should be specified to be suspended */
        assert(target_state->pwr_domain_state[ARM_PWR_LVL0] ==
@@ -99,7 +98,9 @@ void css_scp_suspend(const struct psci_power_state *target_state)
                }
                return;
        }
-
+#if !HW_ASSISTED_COHERENCY
+       int lvl;
+       uint32_t scmi_pwr_state = 0;
        /*
         * If we reach here, then assert that power down at system power domain
         * level is running.
@@ -136,6 +137,7 @@ void css_scp_suspend(const struct psci_power_state *target_state)
                                ret);
                panic();
        }
+#endif
 }
 
 /*